<?xml version='1.0' encoding='UTF-8' ?>
        <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
        xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-12-14T10:15:01'>
        <xsl:output method='xml' standalone='yes' />
        <xsl:template match='my:myFields'>
        <DynamicEntity Name='csp_familysupportclaim' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
        xmlns:xsd='http://www.w3.org/2001/XMLSchema' >
        <Properties xmlns='http://schemas.microsoft.com/crm/2006/WebServices'>

			
					<xsl:if test='//my:CitizenAddress/text()'>
						<Property xsi:type='StringProperty' Name='csp_address'>
							<Value><xsl:value-of select='//my:CitizenAddress'/></Value>
						</Property>
					</xsl:if>

					<xsl:if test='//my:CitizenCity/text()'>
						<Property xsi:type='StringProperty' Name='csp_city'>
							<Value><xsl:value-of select='//my:CitizenCity'/></Value>
						</Property>
					</xsl:if>

					<xsl:if test='//my:CitizenZip/text()'>
						<Property xsi:type='StringProperty' Name='csp_postalcode'>
							<Value><xsl:value-of select='//my:CitizenZip'/></Value>
						</Property>
					</xsl:if>

					<xsl:if test='//my:CitizenEmail/text()'>
						<Property xsi:type='StringProperty' Name='csp_emailaddress'>
							<Value><xsl:value-of select='//my:CitizenEmail'/></Value>
						</Property>
					</xsl:if>

					<xsl:if test='//my:CitizenPhone/text()'>
						<Property xsi:type='StringProperty' Name='csp_phone'>
							<Value><xsl:value-of select='//my:CitizenPhone'/></Value>
						</Property>
					</xsl:if>

					<xsl:if test='//my:CitizenFax/text()'>
						<Property xsi:type='StringProperty' Name='csp_fax'>
							<Value><xsl:value-of select='//my:CitizenFax'/></Value>
						</Property>
					</xsl:if>

				<xsl:if test='//my:FamilySupportDate/text()'>
        <Property xsi:type='CrmDateTimeProperty' Name='csp_claimdate'>
          <Value><xsl:value-of select='//my:FamilySupportDate'/></Value>
        </Property>
        </xsl:if>

        <xsl:if test='//my:FamilySupportClaim/text()'>
        <Property xsi:type='StringProperty' Name='csp_claimdescription'>
          <Value><xsl:value-of select='//my:FamilySupportClaim'/></Value>
        </Property>
        </xsl:if>

        <xsl:if test='//my:FamilySupportClaimedBefore/text()'>
	      <Property xsi:type='CrmBooleanProperty' Name='csp_claimedbefore'>
        <xsl:if test="//my:FamilySupportClaimedBefore='Yes'">
          <Value>true</Value> 
        </xsl:if>
        <xsl:if test="//my:FamilySupportClaimedBefore='No'">
          <Value>false</Value> 
        </xsl:if>
        </Property>
        </xsl:if>

        <xsl:if test='//my:FamilySupportAdults/text()'>
        <Property xsi:type='CrmNumberProperty' Name='csp_numberofadults'>
          <Value><xsl:value-of select='//my:FamilySupportAdults'/></Value>
        </Property>
        </xsl:if>

        <xsl:if test='//my:FamilySupportChildrens/text()'>
        <Property xsi:type='CrmNumberProperty' Name='csp_numberofchildren'>
          <Value><xsl:value-of select='//my:FamilySupportChildrens'/></Value>
        </Property>
        </xsl:if>

        <xsl:if test='//my:FamilySupportWeeklyIncome/text()'>
        <Property xsi:type='CrmMoneyProperty' Name='csp_weeklyincome'>
          <Value><xsl:value-of select='//my:FamilySupportWeeklyIncome'/></Value>
        </Property>
        </xsl:if>
				</Properties>
				</DynamicEntity>
				</xsl:template>
					
</xsl:stylesheet>
